#nullable enable
using System;
using System.Collections.Generic;

namespace REP.Domain.Entities
{
    /// <summary>
    /// BOM 主实体（新增 BOM 基础信息 + 关联明细）
    /// </summary>
    public class Bom : BaseEntity
    {
        /// <summary>BOM 编号</summary>
        public string? BomCode { get; set; }
        /// <summary>系统编号（系统自动生成）</summary>
        public string? SystemCode { get; set; }
        /// <summary>产品/成品类型（下拉：成品/半成品/其他）</summary>
        public string? ProductType { get; set; }
        /// <summary>产品编码（可选）</summary>
        public string? ProductCode { get; set; }
        /// <summary>产品名称（可选）</summary>
        public string? ProductName { get; set; }
        /// <summary>规格型号</summary>
        public string? SpecModel { get; set; }
        /// <summary>单位</summary>
        public string? Unit { get; set; }
        /// <summary>版本标签/版次号</summary>
        public string? VersionTag { get; set; }
        /// <summary>图号/图纸编号</summary>
        public string? DrawingNo { get; set; }
        /// <summary>是否默认版本</summary>
        public bool? IsDefault { get; set; }
        /// <summary>生效日期</summary>
        public DateTime? EffectiveDate { get; set; }
        /// <summary>失效日期</summary>
        public DateTime? ExpireDate { get; set; }
        /// <summary>日产量（可选）</summary>
        public decimal? DailyOutput { get; set; }

        /// <summary>BOM 配件明细集合（页面“BOM配件”表格）</summary>
        public List<BomAccessory>? Accessories { get; set; }

        /// <summary>关联的工艺路线（多选时使用映射表 BomProcessRoute）</summary>
        public List<BomProcessRoute>? ProcessRoutes { get; set; }
    }
}
